package com.lxit.video.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/** 视频评论信息 */
@Entity
@Table(name = "video_comment")
public class VideoComment {
	@Id
	@Column(name = "comment_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	/** 主键id */
	private Integer commentId;

	/*@Column(name = "commentator")
	*//** 评论人id *//*
	private int commentator;

	@Column(name = "video_id")
	*//** 视频id *//*
	private int videoId;*/

	@JoinColumn(name="commentator") //关联的列
	@ManyToOne()
	/**
	 * 用户操作对象; 评论人id 
	 */
	private UserInfo userInfo;
	
	@JoinColumn(name="video_id") //关联的列
	@ManyToOne()  
	/**
	 *	视频对象;   视频id
	 */
	private VideoInfo videoInfo;
	
	
	@Column(name = "comment_status")
	/** 评论状态（0:正常 1:失效） */
	private int commentStatus;

	@Column(name = "comment_details")
	/** 评论详情 */
	private String commentDetails;

	@Column(name = "comment_time")
	/** 视频评论时间 */
	private Date commentTime;

	@Column(name = "create_time")
	/** 创建时间 */
	private Date createTime;

	public Integer getCommentId() {
		return commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	public UserInfo getUserInfo() {
		return userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}

	public VideoInfo getVideoInfo() {
		return videoInfo;
	}

	public void setVideoInfo(VideoInfo videoInfo) {
		this.videoInfo = videoInfo;
	}

	public int getCommentStatus() {
		return commentStatus;
	}

	public void setCommentStatus(int commentStatus) {
		this.commentStatus = commentStatus;
	}

	public String getCommentDetails() {
		return commentDetails;
	}

	public void setCommentDetails(String commentDetails) {
		this.commentDetails = commentDetails;
	}

	public Date getCommentTime() {
		return commentTime;
	}

	public void setCommentTime(Date commentTime) {
		this.commentTime = commentTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
}
